package hotel.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import hotel.dao.LoginDao;
import hotel.pojo.ManagerDto;
import hotel.service.LoginService;

@Service
public class LoginServiceImpl implements LoginService {
	
	@Resource
	LoginDao loginDao;
	
	public boolean judgeIogin(String id, String password) {
		List<ManagerDto> list = loginDao.ManagerLogin(id);
		if(list == null || list.size() == 0 || !list.get(0).getPass().equals(password)) {
			return false;
		}
		return true;
	}

}
